const tbody = document.querySelector('tbody')
async function getScore() {
    const res = await axios({ url: 'score/list' })

    const { data } = res.data
    console.log(data
    );
    let html = ''
    for (const key in data) {
        const { name, score } = data[key]
        html += `
        <tr>
        <th scope="row">${key}</th>
        <td>${name}</td>
        <td  data-stu_id=${key} data-batch=${1}  class="score">${score[0]}</td>
        <td  data-stu_id=${key} data-batch=${2}  class="score">${score[1]}</td>
        <td  data-stu_id=${key} data-batch=${3}  class="score">${score[2]}</td>
        <td  data-stu_id=${key} data-batch=${4}  class="score">${score[3]}</td>
        <td  data-stu_id=${key} data-batch=${5}  class="score">${score[4]}</td>
      </tr> 
        `
    }
    tbody.innerHTML = html
}

getScore()
